package com.gonsin.ta.logic.parse.serialize;

import com.gonsin.ta.logic.enums.ComponentTypeEnum;
import com.gonsin.ta.logic.enums.NodeTypeEnum;
import com.gonsin.ta.logic.parse.condition.Executable;
import com.gonsin.ta.logic.process.TaBus;
import lombok.Data;

/**
 * spring 类型的节点
 */
@Data
public class NodeSerial implements TaDeserializable{

    private String nodeId;

    private ComponentTypeEnum componentType;

    private NodeTypeEnum nodeType;

    @Override
    public Executable toExecutable(DeserializeContext deserializeContext) {
        return TaBus.getNode(nodeId);
    }
}
